<aside class="main-sidebar">

    <section class="sidebar">



        <?php
        $menus=$this->context->menus;
        $items=[];
        foreach($menus as $key=>$val){
            $items[$key]=['label' => $key,'icon'=>$val['icon'],'url'=>'#'];
            if(is_array($val['children'])){

                foreach($val['children'] as $k=>$v){
                    $items[$key]['items'][]=['label'=>$k,'icon'=>$v['icon'],'url'=>$v['url']];
                }

            }else{
                $items[$key]['url']=[$val['url']];
            }
        }
        ?>

        <?= dmstr\widgets\Menu::widget(
            [
                'options' => ['class' => 'sidebar-menu'],
                'items' =>$items
            ]
        ) ?>

    </section>

</aside>
